<template>
	<div>
		<el-form label-width="140px" :model="ruleForm" ref="ruleForm" class="demo-ruleForm">
			<v-form-title title="机构认证"/>
			<div class="certica-detail-list">
				<el-form-item label="企业名" prop="enterpriseName">{{certica.enterpriseName}}</el-form-item>
				<el-form-item label="社会统一信用代码">{{certica.socialCreditCode}}</el-form-item>
			</div>
			<div class="certica-detail-list">
				<el-form-item label="法定代表人姓名">{{certica.legalRepresentative}}</el-form-item>
				<el-form-item label="法人身份证">{{certica.legalCertNo}}</el-form-item>
			</div>
			<div class="certica-detail-list">
				<el-form-item label="组织机构代码号">{{certica.organizationCode}}</el-form-item>
			</div>
			<v-form-title title="业务授权"/>
			<div class="certica-detail-list">
				<el-form-item label="经办人姓名">{{certica.managerName}}</el-form-item>
				<el-form-item label="经办人手机号">{{certica.managerPhoneNumber}}</el-form-item>
			</div>
			<div class="certica-detail-list">
				<el-form-item label="经办人身份证号">{{certica.managerIdNumber}}</el-form-item>
			</div>
			<v-form-title title="对公账户绑定"/>
			<div class="certica-detail-list">
				<el-form-item label="账户名">{{account.accountPerson}}</el-form-item>
				<el-form-item label="银行行号">{{account.cnapsCode}}</el-form-item>
			</div>
			<div class="certica-detail-list">
				<el-form-item label="开户银行">{{account.bankName}}</el-form-item>
				<el-form-item label="银行账号">{{account.accountNumber}}</el-form-item>
			</div>
			<!--<div class="certica-detail-list">-->
				<!--<el-form-item label="银行汇款金额">{{account.accountBalance}}</el-form-item>-->
			<!--</div>-->
			<v-form-title title="证件影像信息"/>
			<div class="enterprise-imig-box">
				<div class="img-box">
					<el-form-item label="营业执照正本" class="img-box-title">
					</el-form-item>
					<img :src="certica.businessLicensePhoto" alt="">
				</div>
				<div class="img-box">
					<el-form-item label="法人身份证正面" class="img-box-title">
					</el-form-item>
					<img :src="certica.legalFrontPhoto" alt="">
				</div>
				<div class="img-box">
					<el-form-item label="法人身份证背面" class="img-box-title">
					</el-form-item>
					<img :src="certica.legalBackPhoto" alt="">
				</div>
				<div class="img-box">
					<el-form-item label="税务登记证正面" class="img-box-title">
					</el-form-item>
					<img :src="certica.taxRegistrationPhoto" alt="">
				</div>
			</div>
		</el-form>
	</div>
</template>
<script lang="ts">
	import { Component, Prop, Vue } from 'vue-property-decorator'
	import vFormTitle from '@/components/form-title'

	@Component({
			components: {
					vFormTitle
			}
	})
	export default class CerticaDetail extends Vue {
		ruleForm = {}


		@Prop({
				default: () => {}
		}) certica
		@Prop({
				default: () => {}
		}) account
		props: ['certica','account']
		created () {

		}

		// account = {}
		// async getAccount() {
		// 	let enterpriseUserId = JSON.parse(window.sessionStorage.getItem('userInfo')).enterpriseUserId
		// 	console.log(enterpriseUserId)
		// 	let accountInfo: AjaxResponse = await this.$axios.get(`g/gateway/account/user/${enterpriseUserId}`)
		// 	console.log(accountInfo.data[0],'78978978978979')
		// 	this.account = accountInfo.data[0]
		// }
		mounted () {

			// this.getAccount()
			// if(window.sessionStorage.getItem('certicaAccountDetail') != null){
			// 	this.account = JSON.parse(window.sessionStorage.getItem('certicaAccountDetail'))
			// }
			// this.getAccount()
			// console.log(this.certica)
			// console.log(window.localStorage.getItem('enterpriseAccount'))
		}
  }
</script>
<style lang="less" scoped>
	.certica-detail-list {
		display: flex;
		.el-form-item {
			width: 50%;
		}
	}
	.img-box {
		flex-direction: column;
		text-align: center;
		img {
			width: 100px;
			/*margin-right: 20px;*/
			cursor: pointer;
		}
	}
	.enterprise-imig-box {
		display: flex;
		justify-content:space-around;
	}
	.img-box-title {
		padding-right: 15px;
	}
</style>
